package com.ss.android.article.base.feature.video;

import android.content.Context;
import android.support.design.a;
import android.util.AttributeSet;
import android.view.SurfaceView;

public class SSSurfaceView extends SurfaceView {
    public SSSurfaceView(Context context) {
        super(context);
    }

    public SSSurfaceView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public SSSurfaceView(Context context, AttributeSet attrs, int defaultStyle) {
        super(context, attrs, defaultStyle);
    }

    public void onWindowVisibilityChanged(int visibility) {
        if (a.isComponentActive(this.getContext())) {
            super.onWindowVisibilityChanged(visibility);
        } else if (visibility == VISIBLE) {
            super.onWindowVisibilityChanged(visibility);
        }
    }
}

